package com.youdianda.mapper;

import com.youdianda.entity.SysConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author sdy
 * @since 2023-05-15
 */
@Mapper
public interface SysConfigMapper extends BaseMapper<SysConfig> {

    @Select("select * from sys_config ")
    List<SysConfig> selectList();
    @Select("select DISTINCT tab_value from sys_config ORDER BY tab_value DESC")
    List<String> getTabValue();

    @Select("select DISTINCT group_value from sys_config WHERE tab_value = #{tab_value} ORDER BY group_value DESC;")
    List<String> getGroupValues(String tab_value);
}
